import request from './../utils/request.js'

// 查询所有角色
export const roleApi = (data)=>{
    return request('/role/findAll',{method:'POST',data})
}

// 添加/新增角色
export const addRolesApi=(data)=>{
    return request('/role/add',{method:'POST',data})
}
// 获取所有权限
export const permsApi=()=>{
    return request('/role/findPerms')
}

// 根据id删除角色
export const delRolesApi = (id)=>{
    return request(`/role/del/${id}`,{method:"DELETE"})
}

// 修改角色
export const updateApi=(roleVo)=>{
    return request('/role/update',{method:'PUT',data:roleVo})
}
